


public class shellSort{
	
	public void sort(int [] array){
		int len = array.length;
		for (int r=len/2; r>=1; r=r/2) {
			for(int i=r;i<len;i++){
				int j = i-r;
				int temp = array[i];
				while(j>=0 && temp < array[j]){
					array[j+r] = array[i];
					j -= r;
				}
				array[j+r] = temp;
			}
		}
	}
}